using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace DBSetupHelper
{
    /// <summary>
    /// 
    /// </summary>
    public class DBScript
    {
        private string scriptPath;
        private bool testInstall;
        private bool disabled;

        /// <summary>
        /// Initializes a new instance of the <see cref="DbScript"/> class.
        /// </summary>
        /// <param name="scriptPath">The script path.</param>
        /// <param name="testInstall">if set to <c>true</c> [test install].</param>
        /// <param name="disabled">if set to <c>true</c> [disabled].</param>
        public DBScript(string scriptPath, bool testInstall, bool disabled)
        {
            if (string.IsNullOrEmpty(scriptPath))
                throw new ArgumentNullException("scriptPath");

            this.testInstall = testInstall;
            this.disabled = disabled;

            if (scriptPath.IndexOf(':') == -1)
                this.scriptPath = Environment.CurrentDirectory + "\\" + scriptPath;
            else
                this.scriptPath = scriptPath;
        }

        /// <summary>
        /// Gets the script path.
        /// </summary>
        /// <value>The script path.</value>
        public string ScriptPath
        {
            get { return this.scriptPath; }            
        }

        /// <summary>
        /// Gets the test install.
        /// </summary>
        /// <value>The test install.</value>
        public bool TestInstall
        {
            get { return this.testInstall; }
        }

        /// <summary>
        /// Gets the disabled.
        /// </summary>
        /// <value>The disabled.</value>
        public bool Disabled
        {
            get { return this.disabled; }
        }
    }
}
